package cn.hzw.supermarket.activity;

import androidx.appcompat.app.AppCompatActivity;

import android.content.Intent;
import android.os.Bundle;
import android.os.Handler;
import android.view.Window;
import android.view.WindowManager;

import cn.hzw.supermarket.R;
import cn.hzw.supermarket.databinding.ActivityLoading3Binding;

public class Loading3Activity extends AppCompatActivity {
    private ActivityLoading3Binding binding;
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        //隐藏标题栏以及状态栏
        getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,WindowManager.LayoutParams.FLAG_FULLSCREEN);
        requestWindowFeature(Window.FEATURE_NO_TITLE);
        binding = ActivityLoading3Binding.inflate(getLayoutInflater());
        setContentView(binding.getRoot());
        //线程加载
        new Handler().postDelayed(new Runnable() {
            @Override
            public void run() {
                //等待3秒后销毁此界面，并提示登录成功
                Loading3Activity.this.finish();
                Intent intent = new Intent();
                intent.setClass(Loading3Activity.this,MainActivity.class);
                startActivity(intent);
            }
        },3000);
    }
}